<?php
	$carousel = get_carousel($_SESSION["language"]["id"]);
	
	if(count($carousel) > 0)
	{
?>
<div id="carousel" class="carousel slide" data-ride="carousel">
	<!-- Indicators -->
	<ol class="carousel-indicators">
		<?php
			$active = "active";
			for($i = 0; $i < count($carousel); $i++)
			{
				echo '<li data-target="#carousel" data-slide-to="'.$i.'" class="'.$active.'"></li>';
				$active = "";
			}
		?>
	</ol>
	<!-- Wrapper for slides -->
  
	<div class="carousel-inner">
		<?php
			$i = 0; $active = "active";
			foreach($carousel as $car){
		?>
			<div class="item <?php echo $active; ?>">
				<img src="<?php echo scripts_url() . $car["picture"]; ?>" alt="" class="img-responsive"/>
					<div class="carousel-caption">
						<h2><?php echo $car["title"]; ?></h2>
						<?php echo $car["description"]; ?>
					</div>
					<div class="carousel-alt-caption">
				  		<?php echo $car["alt_description"]; ?>
					</div>
			</div>
		<?php
				$active = ""; $i++;
			} ?>

  </div>
   <!-- Controls -->
</div>
<?php } ?>